home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-10-05 | 3.4 KB | 75 lines | [TEXT/MPS ] |
- This folder contains useful VU task libraries which you might want to
- make use of in your scripts.
-
- The files and brief descriptions of their contents follows:
-
- 1. StringsLib.vu
- Contains: Task defintions to convert numbers into strings and strings into numbers.
-
- The main tasks are:
- a) task NumToStr(number)
- This task takes in a number and converts it into a string. If the argument
- passed in is not a number undefined is returned.
-
- b) task StrToNum(str, start_index := 1, end_index := -1)
- This task takes in a string and converts it into an integer, if possible.
- You can pass a start and end indices into a string in which a number is
- embedded. This task deals with both positive and negative numbers.
- It returns MaxNum (32767) or MinNum (-32767) in error(overflow) conditions.
- It deals with cases such as "+123" and "-462" as well as unsigned ones like "981".
- If the argument passed in is not a string undefined is returned.
-
-
-
- 2. FinderOperationsLib.vu -
- Contains: Tasks that help do some simple Finder operations like selecting a file in
- a window or trashing it.
-
- a) task Find_object_in_window (at_x, at_y)
- This task moves the mouse on to a particular object of interest. Very useful to select
- files in "View By Name" mode in Finder.
- b) task throw_trash(print_any_error := true, override_alerts := false)
- This task trashes a specified object in Finder. The argument 'print_any_error'
- can be used to suppress the error messages printed by this task.
- 'override_alerts' can be used to trash despite alerts (it selects the 'OK' button)
- if this argument is true (or non null).
-
-
- 3. StandardDialogsLib.vu -
- Contains: Sample tasks for working with standard Macintosh dialogs
- The tasks in this file are:
-
- a) do_save_as( save_title := 'Untitled' ) :
- This task handles a simple case of saving a file with the Standard File dialog.
- b) select_from_standard_file(path_to_file,maximum_nesting_depth := 64) :
- This task will select a file from the standard file dialog.
- It navigates through the dialog by way of the keyboard.
- It takes two parameters, one is a list of file prefixes that will take
- the virtual user down to the file you want selected. The list must
- contain the strings that VU can type to reach the file. They may be the
- complete folder names or enough of the folder name to distinguish them
- from sibling folders. The second is a number indicating the current
- directory's maximum depth. VU uses this number to get up to the top using
- command-up arrow. By default, it is 64 so it isn't necessary to pass
- the second parameter. The operation may be made faster, however, if you
- pass it a smaller number. A sample call might look like this:
- select_from_standard_file( { "HD","MPW","Interf","Cinclu","Palettes" },10 );
-
-
- 4. TimeLib.vu -
- Contains: Tasks that make it easier to work with time in VU.
-
- a) task wait_for_time( end_hour := 0, end_minute := 0, end_second := 0 ) :
- This task will wait until a specified time of day.
-
- b) task print_current_time(print_date := true) :
- This task pretty prints the current time. The format is as follows:
- <hour of day>:<minutes>:<seconds> <AM or PM>
- It also takes one parameter that indicates whether the date should be printed.
- If the actual parameter passed is a true value, the current date is also printed.
- If no parameter is passed, the date is printed by default.
- The format of the date is as follows:
- <month>/<day>/<year>
-
-
-